package cn.com.sbell.vss.csg.vap;

import org.dom4j.Element;

import cn.com.sbell.vss.csg.vap.bean.IPCameraInfo;
import cn.com.sbell.vss.csg.vsclient.VsClient;
import cn.com.sbell.vss.csg.vsclient.util.PropertiesHolder;

public class GetIpCameraInfo extends ProtectedVsCommander {

	protected Element executeCommand(VsClient vsClient,
			PropertiesHolder holder, Element root) {
		IPCameraInfo ipCameraInfo = vsClient.getIPCameraInfo();
		root.addElement("whiteBalance").setText(
				toString(ipCameraInfo.getWhiteBalance()));

		root.addElement("powerFreq").setText(
				toString(ipCameraInfo.getPowerFreq()));

		root.addElement("panRM").setText(toString(ipCameraInfo.getPanRM()));

		root.addElement("panRP").setText(toString(ipCameraInfo.getPanRP()));

		root.addElement("panHome").setText(
				toString(ipCameraInfo.getPanHome().toString()));

		root.addElement("tiltRM").setText(toString(ipCameraInfo.getTiltRM()));

		root.addElement("tiltRP").setText(toString(ipCameraInfo.getTiltRP()));

		root.addElement("tiltHome").setText(
				toString(ipCameraInfo.getTiltHome()));

		root.addElement("ledPower").setText(
				toString(ipCameraInfo.getLedPower()));

		root.addElement("outputStatus").setText(
				toString(ipCameraInfo.getOutputStatus()));

		root.addElement("enableNightView").setText(
				toString(ipCameraInfo.getEnableNightView()));

		return root;
	}

}
